package com.gw.ycny.config;

import org.springframework.stereotype.Component;
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;

@Component
public class LoginInterceptor extends HandlerInterceptorAdapter {
//    @Override
//    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
//        if(null == request.getParameter("ticket") || "".equals(request.getParameter("ticket"))) {
//            //重定向到统一认证服务端，service参数是业务系统LoginModule请求地址
//            // isc登录成功后会重定向跳转页面到service参数的页面，在页面请求地址后面用？携带以下参数ticket=ST-373489-edea616cabTlkyR4e7In-10.223.57.127
//            response.sendRedirect("http://10.223.57.127:17089/isc_sso/login?service=http://22.56.98.44:8087/gw-ycny-isc/login");
//            return false;
//        }else {
//            return true;
//        }
//
//    }
}
